{template "","header"}
<script type="text/javascript">
$(function(){
	$('#product_brand_add').fancybox({
			'width'				: 530,
			'height'			: 450,
			'href'				: '{APP_PATH}index.php?m=brand&c=index&a=add&type=1',
			'autoScale'			: false,
			'transitionIn'		: 'none',
			'transitionOut'		: 'none',
			'type'				: 'iframe'
		});
	$('a.createBtn1').fancybox({
			'width'				: 530,
			'height'			: 400,
			'autoScale'			: false,
			'transitionIn'		: 'none',
			'transitionOut'		: 'none',
			'type'				: 'iframe'
		});
	$('a.createBtn2').fancybox({
			'width'				: 530,
			'height'			: 260,
			'autoScale'			: false,
			'transitionIn'		: 'none',
			'transitionOut'		: 'none',
			'type'				: 'iframe'
		});
	$("tr.tr1").click(function(){
		bid = $(this).attr('rel');
		$('.tr_'+bid).each(function(){
			$(this).toggle()
		});
	});
})
</script>
<div id="main">
	<div class="user">
		{template '', 'account_manage_left'}
		<div class="right">
			<div class="po">当前位置：会员中心 > <span>我的栏目</span></div>
			<div class="product">
				<!--
				<p style="margin-bottom:-20px;"><input type="button" value="添加栏目" id="product_brand_add"> 您现在总共添加了 {$total} 个栏目。</span></p>
				-->
				<table cellpadding="0" cellspacing="1">
					<thead>
						<tr>
							<td >栏目(分类)名称</td>
							<td >上级栏目</td>
							<td width="30%" align="center">操作</td>
						</tr>
					</thead>
					<tbody>
						{loop $brands $r}
						<tr class="tr1" style="cursor:pointer;" rel="{$r[id]}">
							<td>{if $r[parentid]!=0}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{/if}{$r[name]}</td>
							<td>{$r[top_catname]}</td>
							<td align="right">{if $r[parentid]==0}<a href="{APP_PATH}index.php?m=brand&c=index&a=addClass&id={$r[id]}" class="createBtn2">添加分类</a> | {/if}
							<a href="{APP_PATH}index.php?m=content&c=product&a=init&bid={$r[id]}">查看产品</a>
							<!--
							{if $r[parentid]==0} | <a href="{APP_PATH}index.php?m=brand&c=index&a=edit&id={$r[id]}" class="createBtn1">编辑</a>{else} | <a href="{APP_PATH}index.php?m=brand&c=index&a=editClass&id={$r[id]}" class="createBtn2">编辑</a>{/if}
							{if $memberinfo[doupload]==1} | 
							<a href="{APP_PATH}index.php?m=brand&c=index&a=delete&id={$r[id]}" onclick="return confirm('删除后将不可恢复，确认要删除吗？');">删除</a>{/if}
							-->
							{if $r[parentid]==0}{else} | <a href="{APP_PATH}index.php?m=brand&c=index&a=editClass&id={$r[id]}" class="createBtn2">编辑</a> | <a href="{APP_PATH}index.php?m=brand&c=index&a=delete&id={$r[id]}" onclick="return confirm('删除后将不可恢复，确认要删除吗？');">删除</a>{/if}
							</td>
						</tr>
						{/loop}
					</tbody>
				</table>
			</div>
		</div>
		<div class="clearit"></div>
	</div>
</div>
{template "","footer"}
